[XM][ACM] Add try,catch back to main() for dry-run
authoratse@norwich.uk.xensource.com <atse@norwich.uk.xensource.com>
Fri, 22 Sep 2006 16:46:32 +0000 (17:46 +0100)
committeratse@norwich.uk.xensource.com <atse@norwich.uk.xensource.com>
Fri, 22 Sep 2006 16:46:32 +0000 (17:46 +0100)
Signed-off-by: Alastair Tse <atse@xensource.com>
Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
tools/python/xen/xm/dry-run.py

index 72edcd6cb58831980f01c3640bd1fab84c790b4b..1202316f700d4c7d41fd25c5670eaee10e635f23 100644 (file)
@@ -32,8 +32,9 @@ def help():
     individually along with the final security decision."""
 
 def main (argv):
-    if len(argv) != 2:
-        raise OptionError('Invalid number of arguments')
+    try:
+        if len(argv) != 2:
+            raise OptionError('Invalid number of arguments')
 
         passed = 0
         (opts, config) = create.parseCommandLine(argv)
@@ -42,7 +43,7 @@ def main (argv):
                 passed = 1
         else:
             print "Checking resources: (skipped)"
-
+                
         if passed:
             print "Dry Run: PASSED"
         else: